<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../../dest/css/fui.css">
    <link rel="stylesheet" href="../../../dest/css/jedate.css">
    <style>
        input{
            border: 1px solid #ccc;
            line-height: 35px;
            border-radius: 3px;
            margin: 15px 0 0 15px;
            text-indent: 5px;
        }
    </style>
</head>
<body>
<input type="text" id="test1" placeholder="默认">
<input type="text" id="test2" placeholder="只选年">
<input type="text" id="test3" placeholder="选年月">
<input type="text" id="test4" placeholder="时分秒">
<input type="text" id="test5" placeholder="年月日时分秒"><br/>
<input type="text" id="test21" placeholder="年范围"><!--时分秒,年月日时分秒同样是这样操作,就不做例子了-->
<input type="text" id="test22" placeholder="年月范围"><br/>
<input type="text" id="test31" placeholder="默认时间">
<input type="text" id="test32" placeholder="大前天"><br/>
<input type="text" id="test41" placeholder="起始值2017-12-02">
<input type="text" id="test42" placeholder="终止值2017-12-20">
<input type="text" id="test43" placeholder="今天的前后7天">
<input type="text" id="test44" placeholder="时分秒"><br/>
<input type="text" id="test51" placeholder="开始时间">
<input type="text" id="test52" placeholder="结束时间">


<script src="../js/jquery.min.js"></script>
<script src="../js/jquery.jedate.js"></script>
<script>
    $.jeDate('#test1');
    $.jeDate('#test2',{
        format:'YYYY年'
    });
    $.jeDate('#test3',{
        format:'YYYY年MM月'
    });
    $.jeDate('#test4',{
        format:'hh:mm'
    });
    $.jeDate('#test5',{
        format:'YYYY/MM/DD hh:mm:ss'
    });
    $.jeDate('#test21',{
        range:' To ',
        multiPane:false,
        format:'YYYY年'
    });
    $.jeDate('#test22',{
        range:' ~ ',
        format:'YYYY年MM月'
    });
    $.jeDate('#test31',{
        isinitVal:true
    });
    $.jeDate('#test32',{
        isinitVal:true,
        initDate:[{DD:"-2"},true]
    });
    $.jeDate('#test41',{
        minDate:'2017-12-02'
    });
    $.jeDate('#test42',{
        maxDate:'2017-12-20'
    });
    $.jeDate('#test43',{
        minDate: $.nowDate({DD:"-7"}),
        maxDate: $.nowDate({DD:"+7"})
    });
    $.jeDate('#test44',{
        format: 'hh:mm:ss',
        minDate:"08:00:00", //最小日期
        maxDate:"20:59:59" //最大日期
    });
    var start={
        format:'YYYY-MM-DD',
        okfun:function(v){
            end.minDate =v.val;
            endDates();
        }
    };
    var end={
        format:'YYYY-MM-DD',
        okfun:function(v){
            start.maxDate=v.val;
        }
    };
    function endDates() {
        end.trigger = false;
        $.jeDate('#test52',end);
    }
    $.jeDate('#test51',start);
    $.jeDate('#test52',end);
</script>
</body>
</html>
